package com.lb.pattern;

import java.util.regex.Pattern;

/**
 * @Author: zhangjun
 * @Date: 2020/8/5 10:01
 * @Description:
 */
public class PatternTest {
    public static void main(String[] args) {
        String sql = "OR ( 客户归属地 = 浙江省";
        String reg = "^(OR|AND)\\s*\\(.*";
        System.out.println(Pattern.matches(reg,sql));

        String sql2 = "OR  客户归属地 = 浙江省)";
        String reg2 = ".*\\)$";
        System.out.println(">>>>>>>>>>" + Pattern.matches(reg2,sql2));
    }
}
